package com.training.java.core.homework04;

/**
 * desktop program
 * 
 * @author Shovan
 * 
 */
public class DesktopDemo {

	public static void main(String[] args) {

		Desktop desktop = new Desktop("LENOVO-2420106D");
		System.out.println("");

		if (!desktop.isPowerOn()) {
			desktop.start();
		}
		System.out.println(desktop.getSerialNumber() + " is started... .");

		System.out.println("I will upgrade desktop, so I'll switch off desktop");
		if (desktop.isPowerOn()) {
			desktop.stop();
		}

		System.out.println("");

		System.out.println(desktop.getSerialNumber() + " is upgrading... .");

		desktop.upgrade(desktop.getMaxMemory() + 40,
				desktop.getMaxDiskCapacity() + 400);
		if (!desktop.isPowerOn()) {
			desktop.start();
		}
		System.out.println(desktop.getSerialNumber()
				+ " boooted after upgrade, I'll shutdown for the day.");
		if (desktop.isPowerOn()) {
			desktop.stop();
		}

	}

}
